﻿
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sproc_Flow_UpdateFlow_V2]') AND type in (N'P', N'PC'))
    DROP PROCEDURE [dbo].[sproc_Flow_UpdateFlow_V2];
GO
CREATE PROCEDURE [dbo].[sproc_Flow_UpdateFlow_V2]
    @FlowID int,
    @FlowName nvarchar(300),
    @FlowRemark ntext,
    @Builder nvarchar(300),
    @StyleID int
AS
BEGIN
SET NOCOUNT ON

UPDATE dbo.UDS_Flow 
    SET
        Flow_name   = @FlowName ,
        Remark      = @FlowRemark ,
        Builder     = @Builder,
        Style_ID    = @StyleID
    WHERE Flow_ID = @FlowId

IF ( @@ROWCOUNT = 0 )
    RETURN -1;  -- not found

RETURN 0;

END
GO
